import vuePlugin from '@vitejs/plugin-vue'
import vueJsxPlugin from '@vitejs/plugin-vue-jsx'
import { defineConfig } from 'vite'
import { resolve } from 'path'

export default defineConfig({
  server: {
    host: '0.0.0.0',
    port: 8787,
    hmr: true,
  },
  plugins: [
    vuePlugin({
      template: {
        compilerOptions: {
          isCustomElement: (tag: string) => tag.includes('cu-'),
        },
      },
    }),
    vueJsxPlugin(),
  ],
  optimizeDeps: {
    exclude: ['@suit/zj-vue3-components'],
  },
})
